﻿using System;

namespace test1
{
    public class BackDoor : IStrategy
    {
        public void operate()
        {
            Console.WriteLine("找乔国老帮忙，让吴国太给孙权施加压力");
        }
    }


    public class GivenGreenLight : IStrategy
    {
        public void operate()
        {
            Console.WriteLine("求吴国太开个绿灯,放行！");
        }
    }

    public class BlockEnemy : IStrategy
    {
        public void operate()
        {
            Console.WriteLine("孙夫人断后，挡住追兵");
        }
    }

    public class Context
    {
        //构造函数
        private IStrategy strategy;
        public Context(IStrategy strategy)
        {
            this.strategy = strategy;
        }

        public void operate()
        {
            this.strategy.operate();
        }
    }

}